function getPreSectionPageNO(currentPageNO, sectionSize) {
	var curSectionPart;
	if (currentPageNO % sectionSize > 0) {
		curSectionPart = parseInt(currentPageNO / sectionSize) + 1;
	} else {
		curSectionPart = parseInt(currentPageNO / sectionSize);
	}
	
	var newPageNO;
	if (curSectionPart <= 1) {
		newPageNO = currentPageNO;
	} else {
		newPageNO = (curSectionPart - 2) * sectionSize + 1;
	}
	
	return newPageNO;
}

function getNextSectionPageNO(currentPageNO, sectionSize, totalPage) {
	var sectionPart;
	if (totalPage % sectionSize > 0) {
		sectionPart = parseInt(totalPage / sectionSize) + 1;
	} else {
		sectionPart = parseInt(totalPage / sectionSize);
	}
	
	var curSectionPart;
	if (currentPageNO % sectionSize > 0) {
		curSectionPart = parseInt(currentPageNO / sectionSize) + 1;
	} else {
		curSectionPart = parseInt(currentPageNO / sectionSize);
	}	
	
	var newPageNO;
	if (curSectionPart + 1 > sectionPart) {
		newPageNO = currentPageNO;
	} else {
		newPageNO = curSectionPart * sectionSize + 1;
	}
	
	return newPageNO;
}

function getPrePageNO(currentPageNO) {
	if (currentPageNO > 1) {
		return currentPageNO - 1;
	}
	return 1;
}

function getNextPageNO(currentPageNO, totalPage) {
	if (currentPageNO < totalPage) {
		return currentPageNO + 1;
	}
	return totalPage;
}